<template>
  <div>
    <!-- 二级页面容器（出口） -->
    <keep-alive>
      <router-view></router-view>
    </keep-alive>

    <!-- 底部tab-bar -->
    <van-tabbar v-model="active" route>
      <van-tabbar-item replace icon="home-o" to="/layout/home"
        >首页</van-tabbar-item
      >
      <van-tabbar-item replace icon="search" to="/layout/user"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style scoped>
/* 底部导航上边框 */
.van-tabbar {
  border-top: 1px solid #f8f8f8;
}
</style>
